package com.coolw.design.pattern.structure.decorate;

/**
 * 抽象装饰类, 咖啡的"装饰器"
 *
 * @author coolw
 * @date 2019-12-24 10:59
 */
public abstract class AbstractCoffeeDecorator implements Coffee {

    protected Coffee coffee;

    public AbstractCoffeeDecorator(Coffee coffee) {
        this.coffee = coffee;
    }

    /**
     * 价格
     */
    @Override
    public double price() {
        return coffee.price();
    }

    /**
     * 配料
     */
    @Override
    public String ingredients() {
        return coffee.ingredients();
    }
}
